import axios from "axios";

export function request(config){
    const instance = axios.create({
      baseURL:'http://localhost:9090',
      timeout:5000
    })
  axios.interceptors.request.use(config => {
    console.log('请求拦截了')
  },error => {
    console.log(error);
  })
  axios.interceptors.response.use(res =>{
    console.log('响应拦截了')
    return res.data
  },error => {
    console.log(error);
  })
   return  instance(config)
}
